<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Cipher.pb</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<pre><font face="Courier New, Courier, mono"size="2"><font color="#006666">;
</font><font color="#006666">; ------------------------------------------------------------
</font><font color="#006666">;
</font><font color="#006666">;   PureBasic - Cipher example file
</font><font color="#006666">;
</font><font color="#006666">;    (c) Fantaisie Software
</font><font color="#006666">;
</font><font color="#006666">; ------------------------------------------------------------
</font><font color="#006666">;
</font><font color="#006666">;
</font>
<b><font color="#006666">CompilerIf</font></b> <font color="#924B72">#PB_Compiler_Unicode</font>
  <b><font color="#006666">CompilerError</font></b> "This program should be compiled in ASCII mode (see Compiler/Compiler Option window)"
<b><font color="#006666">CompilerEndIf</font></b>


<font color="#006666">MessageRequester</font>("CRC32 Test", "Should be 352441C2 : "+<font color="#006666">Hex</font>(<font color="#006666">CRC32Fingerprint</font>(@"abc", 3)), 0)

<font color="#006666">MessageRequester</font>("MD5 Test"  , "Should be ed50deb5bb795508b8a5c8e50dafa954 : "+<font color="#006666">MD5Fingerprint</font>(@"PureBasic",<font color="#006666"> Len</font>("PureBasic")), 0)

<font color="#006666">MessageRequester</font>("DES Test"  , "Should be FrfWXJ4yTjycc : "+<font color="#006666">DESFingerprint</font>("1Fr", "Fr"), 0)

*OutputBuffer =<font color="#006666"> AllocateMemory</font>(100)
<font color="#006666">Base64Encoder</font>(@"PureBasic",<font color="#006666"> Len</font>("PureBasic"), *OutputBuffer, 100)
<font color="#006666">MessageRequester</font>("Base64 Test", "Should be UHVyZUJhc2lj : "+<font color="#006666">PeekS</font>(*OutputBuffer), 0)</font></pre>
</body></html>
